package com.easy.dev.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.easy.dev.entity.Dict;
import com.easy.dev.mapper.DictMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DictServiceImpl extends BaseServiceImpl<Dict>{

    @Autowired
    private DictMapper dictMapper;

    BaseMapper getMapper() {
        return this.dictMapper;
    }

    public List findByType(String type){
        QueryWrapper<Dict> wrapper = new QueryWrapper();
        wrapper.eq("type", type);
        return dictMapper.selectList(wrapper);
    }
};